package com.copractice.data.entity.question;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

import com.copractice.data.entity.PersistentObject;

/**
 * Represents entity which connects tags and questions.
 * 
 * @author Dmitry Churbanov (dmitry.churbanov@gmail.com)
 * @version 1.0 03/19/2009
 */
@Entity
@Table(name = "QUESTIONS_TAGS")
@SuppressWarnings("serial")
public class QuestionsTags extends PersistentObject {

    /**
     * Question Id
     */
    private Long questionsId;

    /**
     * Tag Id
     */
    private Long tagsId;

    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    @Override
    public Long getId() {
        return super.getId();
    }

    @Column(name = "QUESTIONS_ID")
    public Long getQuestionsId() {
        return questionsId;
    }

    public void setQuestionsId(Long questionsId) {
        this.questionsId = questionsId;
    }

    @Column(name = "TAGS_ID")
    public Long getTagsId() {
        return tagsId;
    }

    public void setTagsId(Long tagsId) {
        this.tagsId = tagsId;
    }

}
